package sk.uniza.fri.cerviix.server.network;

import java.io.DataOutputStream;
import java.io.IOException;

public abstract class ServerMessage
{
	protected DataOutputStream stream;
	
	public void attachStream(DataOutputStream stream)
	{
		this.stream = stream;
	}
	
	protected void setHeader(MessageType type) throws IOException
	{
		stream.writeByte(type.value);
	}
	
	public abstract void send() throws IOException;
}
